<div class="event">
<?php foreach($model as $line): ?>
<?php
	$like = Like::model()->findByPk($line['id']);
?>
    <div class="event-01">
        <div class="event-time border-line border-round">
            <div class="event-time-date"><?php echo date ('d',strtotime($line['date'])); ?></div>
            <div class="event-time-month"><?php echo date ('m/Y',strtotime($line['date'])); ?></div>
        </div>
        <div class="event-info border-line border-round">
            <div class="event-info-title"><?php echo CHtml::link(CHtml::encode($line['name']), array('event/view', 'id'=>$line['id'])); ?></div>
            <div class="event-info-author">Create by: <span><?php echo CHtml::link($line['user']->username, array('users/viewprofiles', 'id'=>$line['create_user_id'])) ?></span></div>
            <div class="event-info-like"><span><?php echo CHtml::encode($like->like); ?></span><span><?php echo CHtml::encode($like->view); ?></span></div>
            <div class="event-info-category">Category: <span><?php echo CHtml::link(CHtml::encode($line['idType']->name), array('event/category', 'type'=>$line['idType']->name)); ?></span></div>
            <div class="clear"></div>
            <div class="event-info-time">Start on <span><?php echo date ('H:i',strtotime($line['time'])); ?></span></div>
            <div class="event-info-place">At <span><?php echo CHtml::encode($line['place']); ?></span></div>
        </div>
        <div class="clear"></div>
    </div><!-- End Event -->
<?php endforeach; ?>
</div>